<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- saved from url=(0090)https://yx.ibikang.com/views/zhensuo/yuangongxq.jsp?ID=335&pageNo=1&xingmingsj=&jinyongbz= -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><!--<base href="https://yx.ibikang.com:443/">--><base href=".">
<link rel="stylesheet" href="../static/css/yuangongxx.css">
</head><body><div class="container-fluid">
    <div class="row-fluid clearfix">
        <div class="span12">
            <form class="form-inline  clearfix" role="form">
                <fieldset style="margin-bottom:0; width:1024px;border-bottom:dashed 1px #ccc; padding-bottom:0;">
                	<div class="crumbs-title">
		                    <b></b>
		                    <span>员工详情</span>
		            </div>
                </fieldset>
            </form>
        </div>
    </div>
    <div class="row-fluid" style="background:#fff;padding-top:0.83rem">
        <div class="span12">
            <form class="form-horizontal newstaff" role="form" method="post" id="addinfo" onsubmit="return false;">
                <div class="form-group" style="margin-top: 1.5rem;display:none">
                    <label class="col-sm-2 control-label text-right g-label-name" for="isNew" style="margin-left: 16.3rem;">是否为新：</label>
                    <div class="col-sm-6">
                        <input type="text" name="isNew" id="isNew" placeholder="请输入账号">
                    </div>
                </div>
                <div class="form-group" style="margin-top: 1.5rem;display:none">
                    <label class="col-sm-2 control-label text-right g-label-name" for="id" style="margin-left: 16.3rem;">ID：</label>
                    <div class="col-sm-6">
                        <!--   <input type="text" name="id" id="id" placeholder="请输入i" /> -->
                    </div>
                </div>
                <div class="form-group" style="margin-top: 1.5rem">
                    <label class="col-sm-2 control-label text-right g-label-name" for="shoujihm"><span class="glyph-star">*</span>手机号码：</label>
                    <div class="col-sm-6 input-shoujihm">
                        <input type="text" class="form-control validate-input" name="shoujihm" id="shoujihm" data-rule="手机号:required;" data-rule-mobile="[/^1[34578]\d{9}$/, &#39;请填写正确的手机号&#39;]" data-target="#msg_holder" placeholder="请输入手机号码">
                        <span class="g-msg"></span>
                        <!--  <input type="text" class="form-control " name="shoujihm" id="shoujihm" data-rule="required;username" placeholder="请输入账号"/> -->
                    </div>
                </div>
                <div class="form-group" style="margin-top: 1.5rem">
                    <label class="col-sm-2 control-label text-right g-label-name" for="shoujihm">医生编码：</label>
                    <div class="col-sm-6 input-yishengbm">
                        <input type="text" class="form-control validate-input" name="yishengbm" id="yishengbm" data-rule="医生编码:length[~20]" autocomplete="off" data-target="#msg_holder" placeholder="请输入医生编码">
                    </div>
                </div>
                <div class="form-group g-input-top" style="margin-top:0;">
                    <label class="col-sm-2 control-label text-right g-label-name" for="xingming"><span class="glyph-star">*</span>姓名：</label>
                    <div>
                        <span name="xingming" id="xingming"></span>
                        <div style="color:#777;font-size:12px;margin-left:115px;"><i class="fa fa-exclamation-circle" aria-hidden="true"></i>员工姓名是个人信息，系统默认采用手机号码作为姓名，该员工登录系统后在个人信息中可以修改姓名和手机号码。</div>
                    </div>
                </div>
              
                <!--     <div class="form-group g-check-top have load-h">
                        <label class="col-sm-2 control-label text-right g-label-name" style="margin-left: 16.3rem;"  >性别：</label>
                        <div class="col-sm-3">
                            <label class="checkbox-inline">
                                <input type="radio" name="xingbie"  value="0"/>男
                            </label>
                            <label class="checkbox-inline" style="margin-left: 3.7rem">
                                <input type="radio" name="xingbie" value="1"/>女
                            </label>
                        </div>
                    </div> -->
                <!--  <div class="form-group g-check-top" >
                     <label class="col-sm-2 control-label text-right g-label-name" style="margin-left: 16.3rem;" for="keshi">科室：</label>
                     <div class="col-sm-3">
                         <select class="form-control cleardefualt " name="keshi" id="keshi">
                             <option value='' disabled selected style='display:none;color:#999'>请选择</option>
                             <option value="全科">全科</option>
                             <option value="其他">其他</option>
                         </select>
                     </div>
                 </div> -->
                <div class="form-group g-form-radio">
                    <label class="col-sm-2 control-label text-right g-label-name "> <span class="glyph-star">*</span>权限：</label>
                     <div class="col-sm-6" style="margin-top:0.5rem">
                        <label name="quanxian1" class="on-check1 f-quanxian" style="margin-left: 0px" title="门诊" data-container="body" data-toggle="popover" data-placement="bottom" data-content="常规门诊">
                           门诊
                        </label>
                         <input type="checkbox" id="quanxian1" name="quanxian" value="1" data-rule="checked" data-msg="权限必填" data-target="#msg_holder">
                        <label name="quanxian2" class="on-check1 f-quanxian" style="margin-left: 0px" title="售药" data-container="body" data-toggle="popover" data-placement="bottom" data-content="售药与发药">
                            售药
                        </label>
                        <input type="checkbox" id="quanxian2" name="quanxian" value="2" data-target="#msg_holder">
                        <label name="quanxian3" class="on-check1 f-quanxian" title="收银" data-container="body" data-toggle="popover" data-placement="bottom" data-content="收款、挂号、还款、收费记录、欠费记录与退费记录">
                            收银
                        </label>
                        <input type="checkbox" id="quanxian3" name="quanxian" value="3" data-target="#msg_holder">
                        <label name="quanxian4" class="on-check1 f-quanxian" title="统计" data-container="body" data-toggle="popover" data-placement="bottom" data-content="首页、查询/统计：门诊记录、药品出库、耗材出库、诊疗项目、附加费用">
                            统计 
                        </label>
                        <input type="checkbox" id="quanxian4" name="quanxian" value="4" data-target="#msg_holder">
                        <label name="quanxian5" class="on-check1 f-quanxian">
                            患者
                        </label>
                        <input type="checkbox" id="quanxian5" name="quanxian" value="5" data-target="#msg_holder">
                        <label name="quanxian6" class="on-check1 f-quanxian" title="管理员" data-container="body" data-toggle="popover" data-placement="bottom" data-content="库存、诊所、医保、系统设置">
                           管理员
                        </label>
                         <input type="checkbox" id="quanxian6" name="quanxian" value="6" data-target="#msg_holder">
                    </div>

                </div>
                <!-- 科室 -->
                <div class="form-group" style="margin-top: 1.5rem">
                    <label class="col-sm-2 control-label text-right g-label-name"><span class="glyph-star">*</span>科室：</label>
                    <input type="hidden" name="keshiid" id="hikeshiid">
					<div class="btn-group col-xs-6 col-sm-6 dropdown-search-li" style="padding:0;border:solid 1px #ccc;width:200px;">
						<div class="btn dropdown-toggle  u-button-select" data-toggle="dropdown" id="keshi" style="width:200px;background: url(&#39;/image/renyuanbiao/drop-list.png&#39;) no-repeat 94%" tabindex="0">请选择</div>
						<ul class="dropdown-menu li-width keshiul" role="menu" style="width:200px;top:35px;left:0;">
						</ul>
					</div>
                </div>
                
                <div class="form-group g-check-top g-shield g-radio-shield" style="margin-bottom:30px;">
                    <label class="col-sm-2 control-label text-right g-label-name">状态：</label>
                    <div class="col-sm-3" style="margin-top:0.5rem">
                        <input type="radio" id="jinyongbz1" name="jinyongbz" value="1">
                        <label class="f-bz" name="jinyongbz1" style="padding-left:2rem">&nbsp;&nbsp;启用</label>
                        <input type="radio" id="jinyongbz2" name="jinyongbz" value="0">
                        <label class="f-bz" name="jinyongbz2" style="margin-left:6%;padding-left:2rem">&nbsp;&nbsp;禁用</label>
                    </div>
                </div>
                <div class="form-group" style="border-top: 1px solid #ccc;padding-top: 30px;">
                	<div class="zs-ygxq-extra" style="margin-left:50px;">
	                	<span class="ygxq-extra-1">诊所关系：</span>
	                	<span class="ygxq-extra-2" id="zhensuogx"></span>
                	</div>
                	<div class="zs-ygxq-extra">
	                	<span class="ygxq-extra-1">登录次数：</span>
	                	<span class="ygxq-extra-2" id="denglucs"></span>
                	</div>
                	<div class="zs-ygxq-extra">
	                	<span class="ygxq-extra-1">加入诊所时间：</span>
	                	<span class="ygxq-extra-2" id="jirsj"></span>
                	</div>
                	<div class="zs-ygxq-extra">
	                	<span class="ygxq-extra-1">最后登录时间：</span>
	                	<span class="ygxq-extra-2" id="zuihoudlsj"></span>
                	</div>
                </div>
                <div class="form-group">
                    <div class="b-btn text-right col-sm-6" style="margin-left:1rem;">
                        <button class="btn  b-save button" id="btnSubmit">保存</button>
                        <div class="btn  b-cancel button button1"><span>返回</span></div>
                    </div>
                </div>
                
            </form>

        </div>
    </div>
</div>

<script src="../static/js/yuangongxq.js"></script>
<script>
	var path = '';
	var pageNo = '1';
	var xingmingsj = '';
	var id = '335';
	var prejinyongbz = '';
	//取消按钮
	$(".b-cancel").click(function(){
		$("#cedan").load(path+"/views/zhensuo/yuangongxx.jsp?pageNo="+pageNo+"&xingmingsj="+xingmingsj+"&dingweiid="+id + '&jinyongbz=' + prejinyongbz);
		return false;
	});
	 //点击保存提交表单   
 $('#btnSubmit').click(function(){
	var keshi = $('#keshi').text();
	if(keshi == '请选择'){
		notifyWarning('请填写科室');
		return false;
	}
 	 $('#addinfo').validator({
 		stopOnError: "true",
 	fields: {
        'shoujihm': 'required;mobile;length[~25]',
        'xingming': 'required;length[~25]',
        'quanxian': 'checked',
    },
    valid: function(form){
    	$.ajax({
			url: path + '/yuangong/xiugaiyg',
			type: 'POST',
			data: $('#addinfo').serializeArray(),
			success: function(data) {
				if(data=="wuguanliyqx") {
						window.location.href = path+"/jump/toIndex";
				} else if(data=="true") {
					var msg="员工信息保存成功";
					msg=encodeURI(encodeURI(msg));
					var sjc=new Date().getTime();
					window.location.href = path+"/views/zhensuo/zhensuo.jsp?msg="+msg+"&sjc="+sjc+"&xingmingsj="+xingmingsj+"&pageNo="+pageNo+"&dingweiid="+id+"&yemianrk=yuangongxq" + '&jinyongbz=' + prejinyongbz;
					return false; 
				}
			}
		});
    }
 	});
		
	});
	
    $(function() {
        shujujz(335);

        //提示功能       
			  $(".f-quanxian").hover(function(){
			      $(this).popover('show');
			  },function(){
			  	  $(this).popover('hide');
			  });
  
       
        //radio验证
        $(".f-bz").on("click",function(){
         	var radioId= $(this).attr("name");
           
            if($(this).hasClass('on')){
            	if($(this).hasClass('r-disable')){
            	  return false;
            	}
            	else{
            	return false;
            	}
            }	
            else{
	            if($(this).hasClass('r-disable')){
	            	  return false;
	            	}
	            	else{
		                $(this).addClass("on").siblings().removeClass("on");
		                $("input[type='radio'][name='jinyongbz']").prop("checked",false); 
		                $("#" + radioId).prop("checked",true);
		           }     
               }
                
        });
        
        
        
        
        if($("#quanxian6").attr("checked") =="checked"){
	           		    $("#quanxian6").prop("checked",true);
	           		    $("label[name='quanxian6']").addClass("c-disable");
	           		 }   
        //checkbox验证
        $(".g-form-radio .on-check1").on("click",function(){

            var radioId= $(this).attr("name");
            if( $(this).hasClass('c-check2')){
                 if($(this).hasClass('c-disable')){
                  return false;
                 }else{
                    $(this).removeClass("c-check2");
                	$("#"+radioId).prop("checked",false);      
                 }
              }
              else{
               if($(this).hasClass('c-disable')){
                  return false;
                 }else{
                    $(this).addClass("c-check2");
                	$("#"+radioId).prop("checked",true); 
                 }
              }
           

        });
    });
</script>
  </body></html>